#include <iostream>

int main(int argc, char const *argv[])
{
    int N = 5;
    int arr[N] = {5, 4, 3, 2, 1};
    int rev[N];
    for (int i = 0; i < N; i++) {
        rev[N - 1 - i] = arr[i];
    }

    for (int i = 0; i < N; i++) {
        std::cout << rev[i] << " ";
    }

    std::cout << std::endl;
    return 0;
}
